
"""我们定义了一个与内容相关的依赖函数."""
from typing_extensions import Annotated

from fastapi import Depends, Path

from core.models import Content
from api.v1.service.content import ContentServiceAPI


def get_content(
    service: Annotated[ContentServiceAPI, Depends()],
    co_id: Annotated[str, Path(..., title="内容 ID", description="内容 ID")]
) -> Content:
    # “内容一次查询依赖性函数”
    return service.read_content(co_id)
